﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;

namespace csharp_macaddress
{
    class Program
    {
        static void Main(string[] args)
        {
            NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
            foreach (NetworkInterface adapter in nics)
            {
                Console.WriteLine(adapter.Name.ToString());
                Console.WriteLine(adapter.GetPhysicalAddress().ToString());
            }

            Console.Write("Press Anykey");
            Console.ReadKey();
        }
    }
}
